/******************************************************************************/
/*!
\file   System.cpp
\author David Seah Seng Chong
\par    email: ssc1987@gmail.com
\date 26/12/2011
\brief
    Header file
    System Header

      Functions included in file:\n

    Copyright (C) 2011 
	Reproduction or disclosure of this file or its contents without the
    prior written consent is prohibited.
*/
/******************************************************************************/
#include "System.hpp"
#include "Window.hpp"

namespace ReekEngine
{
CSystem * CSystem::m_Singleton = NULL;

CSystem * CSystem::GetSingleton()
{
	if(!m_Singleton)
	{
		m_Singleton = new CSystem();
	}
	return m_Singleton;
}

void CSystem::DeleteSingleton()
{
	delete m_Singleton;
}

bool CSystem::Initialize()
{
	m_WindowWidth = 1024;
    m_WindowHeight = 768;

	m_Window = new CWindow();
	if(!m_Window->Initialize())
	{
		return false;
	}
	return true;
}

void CSystem::Update()
{
	m_Window->Update();
}

void CSystem::Shutdown()
{
	m_Window->Shutdown();
	delete m_Window;
}


}
